import request from '@/utils/request'

// 查询布料列表
export function listFabric(query) {
  return request({
    url: '/product/fabric/list',
    method: 'get',
    params: query
  })
}

// 查询布料详细
export function getFabric(fabricId) {
  return request({
    url: '/product/fabric/' + fabricId,
    method: 'get'
  })
}

// 新增布料
export function addFabric(data) {
  return request({
    url: '/product/fabric',
    method: 'post',
    data: data
  })
}

// 修改布料
export function updateFabric(data) {
  return request({
    url: '/product/fabric',
    method: 'put',
    data: data
  })
}

// 删除布料
export function delFabric(fabricId) {
  return request({
    url: '/product/fabric/' + fabricId,
    method: 'delete'
  })
}
